<?php
$this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Login");
$this->breadcrumbs=array(
	UserModule::t("Login"),
);
?>


<?php if(Yii::app()->user->hasFlash('loginMessage')): ?>

<div class="success">
	<?php echo Yii::app()->user->getFlash('loginMessage'); ?>
</div>

<?php endif; ?>



<div class="form">
<?php echo CHtml::beginForm(); ?>


	
	<?php echo CHtml::errorSummary($model); ?>
	

	
	
	
		<div class="input-group input-group-lg">
		<span class="input-group-addon"><i class="fa fa-tag"  ></i></span>
		<?php echo CHtml::activeTextField($model,'username' ,array('class'=>'form-control','placeholder'=>'Nombre usuario')) ?>
	
	    </div>
	
	         <br>
	         
		<div class="input-group input-group-lg">
	   <span class="input-group-addon"><i class="fa fa-lock"  ></i></span>
		<?php echo CHtml::activePasswordField($model,'password' ,array('class'=>'form-control','placeholder'=>'Password')) ?>
	    </div>
	
	    <div>
		
		<?php echo CHtml::link(UserModule::t("Register"),Yii::app()->getModule('user')->registrationUrl); ?> | <?php echo CHtml::link(UserModule::t("Lost password?"),Yii::app()->getModule('user')->recoveryUrl); ?>
		
	<div class="row rememberMe">
		<?php echo CHtml::activeCheckBox($model,'rememberMe'); ?>
		<?php echo CHtml::activeLabelEx($model,'rememberMe'); ?>
	</div>
<div>
	
     	<?php echo CHtml::submitButton(UserModule::t("Aceptar"), array('class'=>"btn btn-primary ")); ?>
   
      	</div>
	
	 </div>
	
	
	
	
<?php echo CHtml::endForm(); ?>
</div><!-- form -->


<?php
$form = new CForm(array(
    'elements'=>array(
        'username'=>array(
            'type'=>'text',
            'maxlength'=>32,
        ),
        'password'=>array(
            'type'=>'password',
            'maxlength'=>32,
        ),
        'rememberMe'=>array(
            'type'=>'checkbox',
        )
    ),

    'buttons'=>array(
        'login'=>array(
            'type'=>'submit',
            'label'=>'Login',
        ),
    ),
), $model);
?>